package com.timebank.score.service.impl;

import com.timebank.common.security.utils.SecurityUtils;
import com.timebank.score.mapper.ScoreTradeMapper;
import com.timebank.score.pojo.entity.ScoreTrade;
import com.timebank.score.pojo.vo.ScoreTradeVO;
import com.timebank.score.service.ScoreTradeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 积分交易 实现类
 * @author shiliuyinzhen
 */
@Service
public class ScoreTradeImpl implements ScoreTradeService {

    @Resource
    private ScoreTradeMapper scoreTradeMapper;

    /**
     * 获取积分交易
     * @return
     */
    @Override
    public List<ScoreTradeVO> getScoreTradeList(ScoreTrade scoreTrade) {
        scoreTrade.setPayerId(SecurityUtils.getUserId());
        return scoreTradeMapper.getScoreTradeList(scoreTrade);
    }
}
